Time to digital converter